package com.jzy.gulimall.product.vo.item;

import com.jzy.gulimall.product.entity.SkuImagesEntity;
import com.jzy.gulimall.product.entity.SkuInfoEntity;
import com.jzy.gulimall.product.entity.SpuInfoDescEntity;
import com.jzy.gulimall.product.vo.SeckillSkuRedisVo;
import lombok.Data;

import java.util.List;

/**
 * @author jzy
 * @date 2020/9/15 21:28
 */
@Data
public class SkuItemVo {
    //1. sku基本信息    pms_sku_info
    private SkuInfoEntity skuInfoEntity;
    //2. sku图片信息    pms_sku_images
    private List<SkuImagesEntity> skuImagesEntities;
    //3. spu销售属性组合
    private List<SkuItemSaleAttrVo> skuItemSaleAttrVos;
    //4. spu信息
    private SpuInfoDescEntity spuInfoDescEntity;
    //5. spu规格参数 多个分组
    private List<SpuItemAttrGroupVo> spuItemAttrGroupVos;

    private boolean hasStock = true;

    //商品秒杀信息
    private SeckillSkuRedisVo seckillSkuRedisVo;


    //一个分组对应的规格信息
    @Data
    public static class SpuItemAttrGroupVo{
        private String groupName;

        private List<SpuBaseAttrVo> attrValues;
    }

    //规格信息
    @Data
    public static class SpuBaseAttrVo{
        private String attrName;

        private String attrValue;
    }
}
